import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = params => axios.post(`${SERVER.WHOLESALES}/tmSpecialProductPrice/page`, params);
// 保存或更新
export const postSave = params => axios.post(`${SERVER.WHOLESALES}/tmSpecialProductPrice/addOrUpdate`, params);

// 编辑
export const postSave1 = params => axios.post(`${SERVER.WHOLESALES}/tmSpecialProductPrice/update`, params);

// 导出
export const exportExcel = params =>axios.post(`${SERVER.WHOLESALES}/tmSpecialProductPrice/exportToExcel`, params, { responseType: 'blob' });

export const excelList1 = params => {
    const url = `${SERVER.WHOLESALES}/DiscountRuleSettings/excelTemplate`;
    return axios({
      url,
      method: 'get',
      responseType: 'blob',
      params:params,
    });
  };